import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:umeng_push_demo/controller/app_controller.dart';

/// FileName home_header_view
///
/// @Author 陈晓星
/// @Date 2024/10/28 10:54
///
/// @Description TODO

class HomeHeaderView extends StatelessWidget {
  const HomeHeaderView({super.key});

  @override
  Widget build(BuildContext context) {
    TextStyle textStyle = TextStyle(
      color: Colors.black87,
      fontSize: 15.w,
    );
    return SizedBox(
      width: double.infinity,
      child: DecoratedBox(
        decoration: BoxDecoration(
          border: Border(
            bottom: BorderSide(
              width: 3.0, // 边框宽度
              color: Theme.of(context).primaryColor, // 边框颜色
            ),
          ),
        ),
        child: Padding(
          padding: EdgeInsets.all(15.w),
          child: Obx(() {
            AppController appController = Get.put(AppController());
            return Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  'DeviceToken: ${appController.deviceToken}',
                  style: textStyle,
                ),
                SizedBox(height: 5.w,),
                Text(
                  '标签: ${appController.tag}',
                  style: textStyle,
                ),
                SizedBox(height: 5.w,),
                Text(
                  '别名: ${appController.alias}',
                  style: textStyle,
                ),
              ],
            );
          }),
        ),
      ),
    );
  }
}
